applying modal