improve specs, work on error handling