reimplement imachine