Finally a working version with simple test and DB access