generate machine and assign numbers