working version
added a random string generator