codes written by Hanson