added error checking for post entry