improve tests, better erros, fixes