why does this need to be made global like this?