updated js to develop new behaviour
added funtions to html
almost everything error fixed
almost everything error fixed