lots of js but i dont think it works :(