working dog object in js