fixing code to work with intel and arm again