finally got validation to work