Removed unnecessary stateIs function