added custom exception
added doc strigs to each functions