added delivery routine that we worked on today, almost complete, needs debugging