add john's code