create post add/edit functions