merge from original shaft repo