fixed methods

added a typecase