optional edit positions function added