james cleaned up some code