refactored completion