convert function to class (in progress) & profiling results