Added references, test function