moved js script to own file for convenience
WIP trying to automate the drawing based on params no more hard coding please