Added custom annotation and error handling code.