Added first draft of algorithm that apply a functor unit