added procExpand function