recursive expansion