finished GetRecord and added tests for errors conditions