added day/night, fixed bugs