First draft of arc code