implemented auto complete for category and mode