eliminated strlen() calls