code changes for issue 59