added basic ~ expansion