modals are working correctly