first draft of code - before dogfooding