resolved bugs function database.py
Merge pull request #11 from giovannipelosi/master

resolved bugs function database.py