Implemented auto-complete as per the specifications