optimize: reduce strlen