added randomseed