New code for examples