write octopus code