codes from UVa