updated with file processing and trackball rotation