implemented: char -> int
bugfixed: delete->free