Updating attachment code