improves is_complete and adds test