added database version check