just broke it, but I'll fix shortly...cleaning up and re-arranging code