can someone provide the code for this as mentioned above?