replace loop with cl-loop