add function for auto reply