filled out the init function and random apple function