adds testing and functions to portfolio class