better ouptuing and encapsulation