moved more logic out of the instance