created basic starGen function