object method snippet