updating posts and database