make sure data variable is initialized