added some utils functions, new automatic validation