removed repeated string into its own method