extract returns 1 on failure