code refactoring and changes to TPAR