Changed deltatime to double