improved tx validation