worked on fixing states and focus