merge sam's changes