An Extension of Quillen's Theorem B