adding all Scott's code