setup base + error handling