updating line positions