timer integrated on the backend for the correct states