- added custom exception
 -removed unreachable extra check