code changes to close #126