my attempt at pseudo code in c_stock