replica of krmahadevan's repo