added gsub and designed more