code cleanup and POST method added and commented out