some refactorings via c9