finally some db query
added ErrorGuard