Refactor to check different States