inject was giving me a weird error, moved to each_with_object