html5 calculator done with pubblisher subscriber pattern