encapsulate fragment in state, instead of exposing it to a client