add modal view & sort function