adds stock functionality