re-organized again, added time support and FPS lock