cleaned up gsub statements