the functions of ans and heart