move class method to scope