final changes to fill database