add error-handling, connection tests