move method into a scope