added option to enable and providing text field for code; tested - works