- revaming problem1 without a loop