add status code (how to improve the error code?)