k1, mahendra | #207 | restructuring code