adds functionality to create posts