implementation of the free group including all strings