using IBMMOdel1, less loops