Better implementation of completion