fully implemented database checks and operations