added step distance functor
changed const to constexpr