added error.h and moved errors there