converted jQuery to vanilla.js, improved css