sorted out the unit testing