completed finish task logic