Completed skeleton code