Added original database code