sorting out dependencies