Moved function to aaa.R as it is not a class method