Added addPost function