how a nerve works