updated cv code