added hidden fields and formatting