refactoring as typed vector
added a function for converting length-one parametres; decent speed improvements