UPD adding framework processing into function to prevent work being added to global scope