added minor validation