Dependency sort out