fixed expanding functionality