convert portal to machine