auto complete and insertion scripts