added and improved confirm flag

added confirm.state functions