added function to check dependencies