positioning per json
moved js into seperate file