converted free floating functions/variables to class methods/attributes in the appropriate class