Added documentation
Fixed issues for takeRecords