code cleanup. ints instead of chars