improve db connection