Moved promotion logic to a script