Refractored current code: 04-04-2014