db posts refactored and get and add working