refactor for Bootstrap Modal