adding a little more testing and validation