added updated status function to chat.c & removed magic numbers