clean up a little code for v1