make convertToRelativePosition public and use it when adding an element.
clean up.