updated previous example