refactored state method to dedicated getter and setter