work on nvm files and line fitting