oops, left some debug console.log's in