updated javascript logic, enabled new game featuere