Added method for random string generation