Added test function to get records