implement submit post functionality