added trace logging
added random logic for the stocks