make the code in onchange self executing