started to implement extraction from db