updated images code