Change closure to method for compatibility purposes