adds check for POST method