added legacy database support (2.0)