added check to see if goals have been completed.