fixed status inheritance, states tree and toString method