Added limit and orderby functionality