adds testing and functions to portfolio class
fixes merge conflics