updated apply modal logic work in index
update