update with fran's code