javascript quantity updates work