fixed timer into an actual context manager