initial full implementation