refactoring db saving for nicks. using transactions now