added timer and other stuff