Refractored current code: 02-11-2014