Write initial getData-method