added condition for completion