half way through refactoring glue