Extract class logic to method