updated to add a version check for dependency