added in proper expansion code