working on secondary database, this should be good for primary database