Added imperative algorithm description