Finished the  skeleton code