J.P. Morgan Interview Question

implement some basic wrapper function