extracting message sending to class