array reference problem