changed some function names and fixed up toxoptions