refactor capitalStock
adjust to set height by max
resolved merge conflicts