function that returns int should use int also internally