added auto-tagging feature (incomplete)