added modal functionality