changed all char * to const char *, just for convenience