added old validation function