refactory methods, replace type for method, add the instance method "is" to check roles