code update
refctoring use of common db table