[WIP] Creating better controller for modals

what does this integer do?