Code for StarNet