result is being saved twice on the next line.