another attempt at ref