Redefined parameters to accept references to variables where applicable