added conversion char to int.