Lab for TP. Version 2. Refactoring and customize