refactoring, updated to bsmx reader