fixed typo and improved encapsulation