work before ajax and modals