Added expand/extract functions with ratint