added alternate imperative solution