Greg/database check