changes id extract function
adds field filter to db