added back-end controller for user-code-input