expansion part completely rewritten