closes #1097, address some CR comments