added limit, fixed fetching of result