adding dog function