moved db call to paginate , removed get_paginator