todo: accomplish compose func