some refactoring codelines