added funtionality to references controller