use char *( cast instead of tmp variable