merge in work from phardy.