removed srand from valueblock to fix problem with getting the same value from rand