Working on machine logic