made the js work but it is pretty bad code. the problem is that i dont know js, i might learn the basics soon.