Thanks to Shamil Yakupov for validation improvement