sending works now. code needs lots of cleanup