updated the fill method