a little validation check