it would have been easier for this to just always be a function, but thats totally non-blocking