added validation of db actions