changed ran to rand, added to_s function to default class initializer snippet