better error handling
basic testing