fixed some things, added timer