move codes from window to tomato-card