checking modal functionality