changed integer to references