merged with Sam's branch