only one function to create post request