merged Scott's branch