added methods and tests to add / update / delete posts