using js again, going to try to reduce the monolithic code into modules instead