rework deps logic