finished refactoring to common library