finished smooth motion via rewrite and fixed both bugs