factor out createRecord
sloppiness