- moved function to class