finished functionality for portfolio class (see examples in test_extensions)
fixed merge issues