correct validation in calculate