[#2, #3] - Updated spec and added some proper error checking