implemented machine init