implemented very basic reduce auto complete