fixed string methods, made types safer to change