beginning correct data variable with key function