refactoring plxReader code