added check for draw