removed dead code and updated unit tests accordingly