modification for unit testing