added current state in the html. gets updated on a get or post