Using only one connection to database