complete migration of code to new pattern