refactor to only work with strings