add quantity change function.