reslove dependcy problems ,add and delete.