simplify using inject