Copied some things from harry.