now sorting posts, fixed typo in posts.js