Added checkDependecies function