change code to remove error