functions for the unit tests