fix extraneous statement in myshowDisplacement function