added exception throwing functions and updated readme