started coding the function that works out who the sender is