refactoring in ldscore.py