added support for postgresql. database path should not be hardcoded. need to be fixed later