Made some changes to match the original.