finished changes for unit testing