implemented some tests, added error catchers