reverse deps
some refctor