prune trailing whitespace
make linear regression available from the java script interface