funcktion to check for dependencies