some changes in trying to connect with database