modify the gaussion filter using for loop instead