now things work.. or well they did before window became undefined