Safestate for task 2