refactor str function into their own files