refactor everythign and add some jquery