Re-imagining of the original code using jgc example