better way to get token