This code is based on Daniel Shiffman's Nature of Code book however have a slight deviation in the mouse interaction for more fun