first cut to recursively compress a string. More test cases and refactoring are needed