adjusted validate code in order to run within 10 minutes and be still useful