fix returning class specific branches and states
remembered why I had this class now