move stuff into functional core