extract modal to main page