splits utility functions into separate .py for use in other files
adds truncating vector function