finished simple validate logic