put def into separate class