first step in converting function to class