use int to store type
prefer the name function to block
remove debugPrint