First draft of result function for simple prototype