fixed the Record errors
imlented query

need to update API and leave a LOT of comments