a couple of improvements

validates the value used and now should write historic events