database checks added