finished Programming Assignment. The cached functions seem to work properly.