todo: reference problem