refactored get_pfstate

refactored method get_pfstate