first (possibly) completely functional version?