Improve a complete function