redo target stuff, refactoring