adds creating posts logic