added Colin's code, commented out for now