Using public API instead of private properties