renamed html saving function to simplify the POST method