final version 3 - database support