some handy codes