added timer but it still needs tweaking