fix search, message function