changed function name and messages places