the rest of it, full implementation