portfolio logic added