minor bug fixes, add new output