added @DependsOn annotation and implemented dependency graph