form calculations from Saumya Dwivedi