refactor
fix to use BmpString.length