adding the code for examples