changed return type to char