commit class casting