[NOT COMPILABLE] refactoring