getting views sorted