work on modal functionality