changed mode from an int to a string