finished coding example