modified validation tool regarding to Gergely