Fixed logging
getting data from DB implemented