replace ints to sizeof