alternative exercise after the loops assignment