learning the codes

copied from web frogs