adding strings and minor refactoring