error fixing expand method