added a error test
rebuild the code