Added some custom code + citing Google codde