Amended db method. Begun a new method