merged john's changes