fix bug on stocks
clean code