add moar error handling, less whitespace