added setinterval to tamagotchi