added random name method and minor fixes