outsourced js and some cs