adding setting bug state functionality