Use only 1 function and add DB connection info