towards general function assembly