added pagination, tests for portfolios