better error handling
add a preset for testing