added DB worker and gave it a constructor