created an isstate typeclass