adding in Hamilton's changes