moved random string generating to a separate module