add function for AErrorWidget