worked on error handling and collections