added orderby to the main view