adding quick validation function, needs to be improved in the future