refactored bootbox js call