refactor _modal