added sort options to posts controller