Added qv function, fix explain bug