started adding database support