updated API to work with an id
added id insertion
added visitor for value retrieval
wrapped transaction in try catch
updated primitive tests with proper value retrieval