implemented 'c', and changed some int to size_t