addtoDB and get keys