added support for optional character limit