Refer to #CODE BLOCKS 14,15,16,17 # on Jupyter Notebook