removed gtc.input
integrating sudarshans work to fresh code