FINALLY connection with database works