Added logic for multiple characters