Added auto_end parameter to fill in database