moved js to standalone file