Updated functions for portfolio functions